package com.sugon.service.impl;

import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.UserSpcFileDao;
import com.sugon.entity.UserSpcFileEntity;
import com.sugon.service.UserSpcFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 特殊人员资质Service实现类
 *
 * @author sugon
 * @date 2019-08-01 10:22:29
 */
@Service("userSpcFileService")
public class UserSpcFileServiceImpl implements UserSpcFileService {
    @Autowired
    private UserSpcFileDao userSpcFileDao;

    @Override
    public UserSpcFileEntity queryObject(String id) {
        return userSpcFileDao.queryObject(id);
    }

    @Override
    public List<UserSpcFileEntity> queryList(Map<String, Object> map) {
        return userSpcFileDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map) {
        return userSpcFileDao.queryTotal(map);
    }

    @Override
    public int save(UserSpcFileEntity userSpcFile) {
        userSpcFile.setId(RandomUtil.randomString(32));
        return userSpcFileDao.save(userSpcFile);
    }

    @Override
    public int update(UserSpcFileEntity userSpcFile) {
        return userSpcFileDao.update(userSpcFile);
    }

    @Override
    public int delete(String id) {
        return userSpcFileDao.delete(id);
    }

    @Override
    public int deleteBatch(String[] ids) {
        return userSpcFileDao.deleteBatch(ids);
    }
}
